<script language='javascript' type='text/javascript' src="<?=base_url('template_type')?>scripts/template_type.js"></script>
<?php echo form_open($this->template_type_list_model->url_prefix); ?>
<center><?if($msg){?><div class="messageBox"><?=$msg?></div><?}?></center>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="text">
  <tr align="center" id="listTableHeader"> 
	<td width="30"><a href="javascript:template_type.sortColumn(<?=$start?>, 'id')"{sort_id}>#</a></td>
    <td width="15"><input type="checkbox" onclick="common.mark_all_rows('uid[]', this.checked)" /></td>
    <td><a href="javascript:template_type.sortColumn(<?=$start?>, 'name')"{sort_name}>Name</a></td>
	<td><a href="javascript:template_type.sortColumn(<?=$start?>, 'note')"{sort_note}>Note</a></td>
    <td width="60">Action</td>
  </tr>
<? $i=1;foreach($items as $item){?>
  <tr class="row<?=($i==1)?'1':'2'?>">
	<td><?=$item->{TEMPLATE_TYPES_TEMPLATE_TYPE_ID}?></td>
    <td><input type="checkbox" name="uid[]" value="<?=$item->{TEMPLATE_TYPES_TEMPLATE_TYPE_ID}?>" /></td>
    <td><?=h($item->{TEMPLATE_TYPES_NAME})?></td>
	<td><?=h($item->{TEMPLATE_TYPES_NOTE})?></td>
    <td>
        <a href="<?=site_url($this->template_type_list_model->url_prefix2.'/'.$start.'/'.$item->{TEMPLATE_TYPES_TEMPLATE_TYPE_ID})?>"><div class="edit_icon">|</div></a>
        <a href="javascript:template_type.deleteOne(<?=$start?>, <?=$item->{TEMPLATE_TYPES_TEMPLATE_TYPE_ID}?>);"><div class="delete_icon"></div></a>
    </td>
  <tr>
<? $i=-$i;} ?>
  <tr>
    <td colspan="5">
	<? if ($items) { if ($paging) { ?>
      <table class="adminlist" border="0" cellpadding="0" cellpadding="0" width="100%" class="PagingTable">
        <tr>
          <td class="pageCounter" width="100%" align="center">
            {paging}
          </td>
        </tr>
      </table>
	<? }} else { ?>
		<br />
		<?=$this->lang->line('not_found')?>
	<? } ?>
    </td>
  </tr>
</table>
</form>